package com.quectel.cms.vo.scheduling;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 排班 设置 人员 日期 - 时间段
 *
 * @author: bob
 * @email: bob.yu@quectel.com
 * @date: 2023-07-19 14:40:00
 */
@Data
@Schema
public class SavePersonWorkTimeVo {

    @Schema(description = "考勤组id")
    @NotNull
    private Long groupId;

    @Schema(description = "人员日期内部类")
    private List<PersonDateInfo> personDateInfos;

    @Schema(description = "时间段数组")
    private List<Long> timeConfigIds;

    /************ 内部类 start ************/
    @Data
    @Schema
    @AllArgsConstructor
    @NoArgsConstructor
    public static class PersonDateInfo implements Serializable {

        @Schema(description = "人员id")
        @NotNull
        private Long id;

        @Schema(description = "日期信息")
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date date;

    }
    /************ 内部类 end ************/
}
